package com.example.pages;

import static org.junit.Assert.assertTrue;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.support.ui.WebDriverWait;


public abstract class Page {
	
	public WebDriver driver;
	
	public boolean isOnThisPage() {
		return true;
	}

	public WebDriverWait wait_(){
	return new WebDriverWait(driver, 10);
	
	}
	
	private void logOut() {
		driver.findElement(By.linkText("Log out")).click();
		assertTrue(closeAlertAndGetItsText().matches("^Are you sure you want to log out[\\s\\S]$"));
		
	}
	
	
	abstract void tryToOpen();
	private String closeAlertAndGetItsText() {
		// TODO Auto-generated method stub
		return null;
	}

	public void newUser(int i, int j, int k, int l) {
		// TODO Auto-generated method stub
		
	}
}
	

